using KamLib;
using Ext.Net;

namespace Ext.Net.UIS
{
    public class TextField : Ext.Net.TextField, ITermBox
    {
        public new Context Context { get; set; }
        public Term Term { get; set; }
        public TermNode ParentTermNode { get; set; }
        public TermNode TermNode { get; set; }

        public bool ControlsCreated { get; set; }
        public void CreateControls(UisCreateControlArgs e)
        {
            this.UisGetTermNode();
            if (TermNode == null) return;

            TermNode.ApplyToField(this);
            TermNode.ApplyListeners(Listeners);
            this.UisAddTermNodeConfigItem();
        }
    }
}